com.supermap.ar.areffect
Class OrientationListener
- java.lang.Object
-
- com.supermap.ar.areffect.OrientationListener
-
- All Implemented Interfaces:
- android.hardware.SensorEventListener
public class OrientationListener extends java.lang.Object implements android.hardware.SensorEventListenerOrientation listener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interfaceOrientationListener.OnOrientationListenerListener interface class
-
Constructor Summary
Constructors Constructor and Description OrientationListener(android.content.Context context)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidonAccuracyChanged(android.hardware.Sensor sensor, int accuracy)voidonSensorChanged(android.hardware.SensorEvent event)voidregisterListener()Registers acceleration and geomagnetic field sensor listener Calls in onResumevoidsetOnOrientationListener(OrientationListener.OnOrientationListener onOrientationListener)Sets the listenervoidunregisterListener()Deleting listener Calls on onPause
-
-
-
Constructor Detail
-
OrientationListener
public OrientationListener(android.content.Context context)
The constructor.- Parameters:
context-
-
-
Method Detail
-
setOnOrientationListener
public void setOnOrientationListener(OrientationListener.OnOrientationListener onOrientationListener)
Sets the listener- Parameters:
onOrientationListener-
-
registerListener
public void registerListener()
Registers acceleration and geomagnetic field sensor listener Calls in onResume
-
unregisterListener
public void unregisterListener()
Deleting listener Calls on onPause
-
onSensorChanged
public void onSensorChanged(android.hardware.SensorEvent event)
- Specified by:
onSensorChangedin interfaceandroid.hardware.SensorEventListener
-
onAccuracyChanged
public void onAccuracyChanged(android.hardware.Sensor sensor, int accuracy)- Specified by:
onAccuracyChangedin interfaceandroid.hardware.SensorEventListener
-
-